package com.pikaqiu.warehouse.domain.dto;

import com.pikaqiu.warehouse.domain.entity.Materials;
import com.pikaqiu.warehouse.domain.entity.Products;
import lombok.Data;

import java.util.List;

/**
 * @Author: Administrator
 * @Date: 2024/8/16
 */
@Data
public class MaterialProductLinkInfoDto {
    private Integer id;
    private String name;
    private String image;

    List<LinkItemDto> linkList;

    public MaterialProductLinkInfoDto(Products products, List<LinkItemDto> linkList) {
        this.id = products.getId();
        this.name = products.getName();
        this.image = products.getImages();
        this.linkList = linkList;
    }

    public MaterialProductLinkInfoDto(Materials materials, List<LinkItemDto> linkList) {
        this.id = materials.getId();
        this.name = materials.getName();
        this.image = materials.getImages();
        this.linkList = linkList;
    }
}
